#pragma once
#include <iostream>
#include "include/nlohmann/json.hpp"

// By Zero123
namespace QIPC
{
	template<typename... Args>
	void call(Args... args)
	{
		// 通过标准输出流 传递数据到宿主进程 规范协议: QIPC_CALL_+JSON+_QIPC_ENDL\n
		auto jo = nlohmann::json::array();
		((
			jo.push_back(args)
			), ...);
		std::cout << "QIPC_CALL_" + jo.dump() + "_QIPC_ENDL" << std::endl;
	}
}
